package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.TravelLike;
import cn.wolfcode.trip.base.query.LikeQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface TravelLikeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(TravelLike record);//新增点赞

    TravelLike selectByPrimaryKey(Long id);

    List<TravelLike> selectAll();

    int updateByPrimaryKey(TravelLike record);

    TravelLike selectLike(@Param("travelId") Long travelId, @Param("userId") Long userId);//查询点赞

    void deleteLike(@Param("travelId") Long travelId, @Param("userId") Long userId);//删除点赞

    Integer countUnReadLikes(LikeQueryObject qo);

    List<Map> selectUserAcceptForList(LikeQueryObject qo);
    List<Map> selectUserSendForList(LikeQueryObject qo);
    void updateState(Long authorId);

    Map maxLike(LikeQueryObject qo);

    Integer countOthersLike(LikeQueryObject qo);

    Integer countLike(LikeQueryObject qo);
}